// const {
// 	$USetCache,
// 	$UGetCache,
// 	$URemoveCacheAll,
// } = require('@utils/storage')
import { setCookie, getCookie, delCookie } from '@utils/cookie';
const {
	userMenuList,
} = require('@utils/config')

module.exports = {

	userSidder(state, getters) {
		let {
			userInfo,
		} = state
		return userMenuList(userInfo, 'sidder')
	},

	userMainMenu(state, getters) {
		let {
			userInfo,
		} = state
		return userMenuList(userInfo, 'main')
	},

	isLogin(state, getters) {
		let userInfo = JSON.parse(getCookie('ddexuser'));
		state.userInfo = state.userInfo || userInfo;
		return !!userInfo;
	},

}